<%@ page contentType="text/html;charset=utf-8" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="jsp.util.ConnectionContext" %>
<%@ page import="java.sql.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Main</title>
 <link rel=stylesheet href="form.css" type="text/css">

  <!------------  CSS 스타일 부분 E--------------->
  <Script Language="javaScript">
  
  function Back(){
	  history.back();
  }
  
  function Next(){
	  
	  
	  
  }
  </Script>
  
 
</head>
<body>
 
<div id="wrapper" style="border:1px solid #696">
	<jsp:include page="Menubar.jsp" flush="false"/>	

 <%
  	int pass_profNum=Integer.parseInt(request.getParameter("profNum"));
 
 %>
  
	
 <div id="body" style="border:1px solid #696">
 	 	
 	<%
 	int temp=0;
 	
	try{
		Connection conn = ConnectionContext.getConnection();
		Statement stmt = conn.createStatement();
		
		String strSQL = "SELECT *FROM profnotice";
		
		
		ResultSet rs = stmt.executeQuery(strSQL);				
		for(int i=1;rs.next(); i++){
			
		 	temp=rs.getInt("numbering");
			
		}rs.close();
		
		
		
		}catch(SQLException ex){
		%>
			에러: <%=ex %>
		<%

			}

		%>
	<%
		int number=temp+1;
	%>
<center>
<p></p> 
<font size='3'><b> Notice </b></font>
<p></p>             
</center>

<TABLE border="0" width="600" cellpadding="2" cellspacing="2" align="center">
	<TR>
      		<TD>
         		<hr size='1' noshade>
      		</TD>
	</TR>
</TABLE>

 	
 <form action="ProfNoticeWrite_Process.jsp">			<!-- form 에서 등록버튼 아직 구현 못함 -->
 	
 	<INPUT TYPE="hidden" NAME="hiddenvalue" SIZE=10 value="<%=pass_profNum%>">
 	<INPUT TYPE="hidden" NAME="hiddennumber" SIZE=10 value="<%=number%>">
 	
	<TABLE border="0" width="600" cellpadding="2" cellspacing="2" align="center">
		<tr>
			<TD width="100" bgcolor="cccccc" align=center><font size="2">Title</font></td>
			<td>
				<input type="text" size="90" name="title">
			</td>
		<tr>
			<TD width="100" bgcolor="cccccc" align=center><font size="2">Writer</font></td>
			<td>
				<input type="text" size="90 name="prof_Name">
			</td>
		</tr>
		
		<tr>
			<TD width="100" bgcolor="cccccc" align=center><font size="2">내용</font>	</td>
			<td colspan="3"><textarea cols='70' rows='15' name='contents' ></textarea>
			</td>
		</tr>	
	</table>

	
	<hr>
	<input type="reset" name="BTNwriteReset" value="다시작성">
	<input type="submit" name="BTNwriteRegist" value="등록"  >
</form>
 	
 </div>

 
</div><!--wrapper div -->
 
  <!------------   DIV 코딩 E--------------->

 
</body>

</html>